﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Machine.Specifications;
using SportsStore.DataBaseInfrastructure;
using NUnit.Framework;
using Raven.Client;

namespace SportsStore.Test.Viewing_The_Products
{
    public class When_I_Ask_For_The_Connection_of_The_Data_Store
    {
        static IDataBase ravenConnection;
        static IDocumentStore documentStore;

        Establish context = () => 
        {
            ravenConnection = new RavenDataBaseConnection(@"http://localhost:8080");
        };

        Because I_Need_Connect_To_Database = () => 
        {
            documentStore = ravenConnection.Connect();
        };

        It should_Connect_To_The_DataStore = () => 
        {
            documentStore.ShouldBeOfType<IDocumentStore>();
        };

    }
}
